package com.a918.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author a918
 * @since 2022-08-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="NodeInfo对象", description="")
public class NodeInfo implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String nodeIndex;

    private Double token;

    private Double creadit;

    @ApiModelProperty(value = "1: 正常，0: 作恶，-1: 见证人节点")
    private Integer status;

    @ApiModelProperty(value = "第round轮的见证人节点")
    private Integer round;

    public NodeInfo(){}

    public NodeInfo(String nodeIndex, Double token, Double creadit, Integer status, Integer round) {
        this.nodeIndex = nodeIndex;
        this.token = token;
        this.creadit = creadit;
        this.status = status;
        this.round = round;
    }
}
